import { Models } from "../typings/model"

class Result {

    

    public static getPagination<T>(records: Array<T>, total: number, pageSize: number, pageNum: number) {
        return {
            records,
            total,
            "pageSize": pageSize,
            "current": pageNum, 
            "pages": Math.ceil(total/pageSize)
        }
    }
}

export default Result